package com.ffggffgfv.backend.entity;

import java.time.LocalDateTime;

/**
 * 购物车实体类
 */
public class Cart {

    private Long id;             // 主键ID
    private Long userId;         // 用户ID
    private Long productId;      // 商品ID
    private Integer quantity;    // 数量
    private Integer selected;    // 是否选中（0-否 1-是）
    private LocalDateTime createTime; // 创建时间
    private LocalDateTime updateTime; // 更新时间

    // Getter and Setter methods
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Integer getSelected() {
        return selected;
    }

    public void setSelected(Integer selected) {
        this.selected = selected;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
}
